package com.jmp.base;

import com.jmp.base.dto.*;
import one.stand.model.ResultModel;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 聊天
 *
 * @author cjr
 */
public interface ChatApi {

    /**
     * 系统消息类型
     */
    String SYS_MSG_COMPANY_APPLY = "SysMsgCompanyApply";

    /**
     * 聊天消息ID：客服
     */
    Integer CHAT_ID_KF = -1;

    /**
     * IM初始化
     */
    @PostMapping("chat/init")
    ResultModel init();

    /**
     * 注册IM账号;IM账号资料更新
     */
    @PostMapping("chat/save")
    ResultModel save(@RequestBody ChatSaveDto request);

    /**
     * IM账号
     */
    @PostMapping("chat/info")
    ResultModel<ChatInfoVo> info(@RequestBody ChatInfoDto request);

    /**
     * 群组
     */
    @PostMapping("chat/group/save")
    ResultModel<ChatGroupSaveVo> groupSave(@RequestBody ChatGroupSaveDto request);

    /**
     * 群组-解散
     */
    @PostMapping("chat/group/remove")
    ResultModel groupRemove(@RequestBody ChatGroupRemoveDto request);

    /**
     * 群组-更新
     */
    @PostMapping("chat/group/info")
    ResultModel<ChatGroupInfoVo> groupInfo(@RequestBody ChatGroupInfoDto request);

    /**
     * 群组-群消息
     */
    @PostMapping("chat/group/msg/system")
    ResultModel groupMsgSystem(@RequestBody ChatGroupMsgSystemDto request);

    /**
     * 系统通知
     */
    @PostMapping("chat/msg/system")
    ResultModel msgSystem(@RequestBody ChatMsgSystemDto request);
}
